import { Sticky } from '@nutui/nutui-react-taro'
import { View } from '@tarojs/components'
import './index.less'

interface FooterProps {
  children?: React.ReactNode
  className?: string
  position?: 'bottom' | 'top'
}

const Footer: React.FC<FooterProps> = ({ children, position = 'bottom' }) => {
  return (
    <Sticky className='footer' threshold={0} position={position}>
      <View className='footer__container'>{children}</View>
      <View className='footer__safe-area' />
    </Sticky>
  )
}

export default Footer
